import sys
from pathlib import Path

import rich
import rich.pretty
import rich.repr

from ..source_parser import parse_source

FILE = Path(__file__).parent / 'meta_test.ets'


def test_tst_parser():
    meta = parse_source(source_file=FILE)
    meta.write(sys.stdout.buffer)

    rich.pretty.pprint(meta)
    for ch in meta.chunks:
        print(bytes(ch).decode(), end='')


def test_editor():
    meta = parse_source(source_file=FILE)  # noqa: F841
